<?php

namespace app\popo\vo;

use app\popo\BaseVO;

/**
 * 套餐概览VO
 */
class SetmealOverViewVO extends BaseVO
{
    /**
     * 已启售数量
     */
    public int $sold;

    /**
     * 已停售数量
     */
    public int $discontinued;

    public function getSold(): int
    {
        return $this->sold ?? 0;
    }

    public function setSold(int $sold): void
    {
        $this->sold = $sold;
    }

    public function getDiscontinued(): int
    {
        return $this->discontinued ?? 0;
    }

    public function setDiscontinued(int $discontinued): void
    {
        $this->discontinued = $discontinued;
    }

    public function toArray(): array
    {
        return [
            'sold' => $this->sold ?? 0,
            'discontinued' => $this->discontinued ?? 0
        ];
    }
}